1. Field of the Invention
The present invention relates generally to curve fitting, and more specifically, to a method for automatically fitting a curve to a data set using a B-spline.
2. Related Art
In computer graphics terminology, a spline curve is defined as a smooth curve used to approximate a series of data points. To fit a spline curve to a series of data points, a set of control points is selected and these control points are used to define the spline curve.
B-splines are a class of spline curves particularly useful in computer graphics applications. For a set of n+1 control points P.sub.k" points on the B-spline curve are defined as: ##EQU1## where the B-spline function N.sub.k,i can be defined as a polynomial of degree i-1.
B-splines can be generated by a method utilizing both manual and automated steps. In this method, the control points are selected by a human operator at locations along the set of data points. To accomplish this, the control points might, for example, be selected in the proximity of the peaks and valleys (local minima and maxima) of the path defined by the set of data points and are selected at locations removed from an imaginary line connecting the data points.
Once the control points are selected, the B-spline curve is drawn according to equation 1. A general purpose computer or graphics workstation is typically used to generate the B-spline curve from the manually selected control points. When the curve is generated, the operator looks at the curve and compares it to the data points. If the curve is close enough, the task is completed. If, however, the curve does not fit the data points to the operator's satisfaction, the operator may relocate the control points or pick additional control points and regenerate the curve.